package labox.innovation.gameserver.network.clientpackets;

import labox.innovation.gameserver.model.actor.instance.FuzePcInstance;

/**
 * @author ljsh
 * @date 2010-4-9 
 * @version 1.0
 * @description 队伍信息设置
 */
public class RequestSetPartyInfo extends L2GameClientPacket {
	private static final String _C_RequestSetPartyInfo = "[C] RequestSetPartyInfo";

	private int _isInvited;//是否允许组队

	@Override
	public String getType() {

		return _C_RequestSetPartyInfo;
	}

	@Override
	protected void readImpl() {
		_isInvited = readByte();
	}

	@Override
	protected void runImpl() {
		FuzePcInstance instance = getClient().getActiveChar();
		if (instance == null) {
			return;
		}
		instance.getFriendInstance().setIsInvited(_isInvited == 0 ? true : false);
	}

}
